package cn.formaggie.service.impl;

import cn.formaggie.dao.SampleImageDao;
import cn.formaggie.entity.model.sample.SampleImage;
import cn.formaggie.service.face.SampleImageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service("sampleImageServiceImpl")
public class SampleImageServiceImpl implements SampleImageService {

    @Autowired
    private SampleImageDao sampleImageDao;

    @Override
    public List<SampleImage> getSampleImagesBySampleId(Integer sampleId) {
        return sampleImageDao.getSampleImagesBySampleId(sampleId);
    }

    @Override
    public Boolean addImages(Integer sampleId, String imagePath) {
        return sampleImageDao.addImages(sampleId,imagePath)>0?true:false;
    }

}
